<?php
namespace app\controller;
use support\Request;
use support\Redis;
use GatewayWorker\Lib\Gateway;
class sgcqController
{
    public function index(Request $request)
    {
        //$ul=
        $km = $request->input('km');
        $id = $request->get('id');
        $udata=$request->input('udata');//获取上传的ui配置（base64格式）
        $udata64=base64_decode(str_ireplace(" ","+",$udata));//将上传的ui配置解析base64
        //$utable=(array)json_decode(base64_decode(str_replace(" ","+",$_POST['udata'])));//上传
        
        $udata=(array)json_decode($udata64);//本地
        $utable=(array)json_decode($udata64);
        
        $udataben='{
	"F5uTe4pY": "文字框29",
	"F6Kv1zgG": "文字框9",
	"Fs113akT": "卡密",
	"F0d4G2Ac": "文字框22",
	"Fc2aR7uL": "文字框12",
	"": null,
	"FGg6Eg8E": "文字框1",
	"FZhs5Y07": "文字框8",
	"FHqA62LV": "文字框2",
	"Fw69uSkB": "保持悬浮窗是停止的,在游戏内再运行辅助",
	"FxhzHT7b": "随机，回城，大陆传送都放快捷栏即可",
	"FY1921B3": "所有游戏悬浮窗都放左,右下角",
	"FN199QpS": "游戏缩放以辅助设置的为准",
	"FtQ1h5V4": "模拟器分辨率为720*1280，dpi320",
	"Fe6sc14s": "禁止开双摇杆",
	"FAU3t0M3": "遇到问题或bug录屏发给客服",
	"FA1Vyebr": "日志密码",
	"FDTkvs76": "卡屏监测",
	"FWp1RCWs": "卡屏监测次数",
	"FTA6NScn": "文字框6",
	"F02I2UP8": "重新记录",
	"F3y8n3SU": "定时重启",
	"FrVRfih3": "重启间隔",
	"FQKWB6YL": "文字框24",
	"FYd1YU7j": "闪退自启",
	"FRpYLpFi": "不显示此提示",
	"F6Y8n85K": "是",
	"FdfqKD3n": "多选框1",
	"FQs7CxwZ": "遇人操作",
	"F0c1g5g9": "遇人操作选择",
	"FtDL3Hws": "玩家检测加强",
	"F8nzigHg": "模式选择",
	"FM3qmq6L": "模式选择选择",
	"FXdaIW9Y": "关闭游戏自带保护",
	"F49Tq6z6": "接令",
	"FfI4G47N": "无目标次数",
	"Fj425iFm": "文字框19",
	"FCS98UW0": "接令上限",
	"F2b5CT0i": "文字框20",
	"Fxyg8S21": "穿戴装备",
	"F5Y2kd89": "包满回收",
	"F86K58cD": "洗红名",
	"FmX88sW2": "ui_医师回血",
	"FAq40r59": "ui_残血操作",
	"F0wFtLUv": "规定血量",
	"FVSP0Kq3": "文字框17",
	"F554vL8X": "ui_残血操作选择",
	"FmZZFn1W": "文字框4",
	"FhKR9r69": "不看复活",
	"F3VuBE02": "宝宝战斗检测",
	"FE717cMC": "定时存仓",
	"Fu4ucC4C": "存仓间隔",
	"FG980b1C": "文字框26",
	"F76U8N3k": "存斗笠",
	"Fc2212AI": "存弓箭",
	"FfFA9M3U": "自动丢物",
	"FMuYGvp5": "ui_定时换图",
	"Fw61twi3": "ui_挂机时间",
	"Fi8s91GZ": "发现没怪",
	"F78PTn2m": "发现没怪间隔",
	"F80GnG4L": "文字框5",
	"FI12G8W1": "ui_没怪使用随机石",
	"FUy68YR5": "ui_使用随机间隔",
	"FiITmH8g": "随机次数换图",
	"FHPLnwnr": "设定随机次数",
	"F9U5CX16": "文字框10",
	"Ff5L81r0": "ui_卡怪不动",
	"Fkx60xv6": "ui_卡怪不动次数",
	"F0EM4X99": "ui_卡怪不动选择",
	"Fmk7tKHD": "按钮4",
	"F7DBrd47": "练技能1",
	"FueCBb19": "练技能1间隔",
	"Fy644Gwu": "文字框27",
	"FpiF6ZLF": "练技能2",
	"F47xcnas": "练技能2间隔",
	"FkYTD0va": "练技能3",
	"F75t4KxH": "练技能3间隔",
	"F419Z89k": "练技能4",
	"F2YDwCjg": "练技能4间隔",
	"FG0KiY6W": "倒序进图",
	"FN00KcW1": "水镜庄",
	"FXzt370b": "襄阳2",
	"FdFf8e0t": "檀溪",
	"F7nraUTH": "灵符秘境挂机42层",
	"F6bW416X": "雾山",
	"F2RLxGZT": "会稽",
	"Fa7YQKKw": "吴郡",
	"FkTHsq0I": "灵符秘境挂机41层",
	"FG2Q0T44": "许昌",
	"FitSF64Q": "荆州3",
	"F36G34w3": "乱石岗",
	"F4G6bR3B": "灵符秘境挂机40层",
	"Fg0V7ZtT": "芦塘寨",
	"F190HATQ": "成都",
	"F00z91M3": "荆州2",
	"FpLNp6G5": "灵符秘境挂机39层",
	"FV97kS1i": "涂中",
	"F43ceAXN": "石头城",
	"F5TNbEcn": "长安",
	"FM17jb0a": "灵符秘境挂机38层",
	"Fr37wnZh": "剑门山",
	"FGGGtGMj": "阴平",
	"FKmPTa9P": "绵竹",
	"F6eRV86j": "灵符秘境挂机37层",
	"FWmCsy08": "雍州",
	"FK3Iw1xV": "淮南",
	"F1UumqmN": "洮阳",
	"F9p443DI": "灵符秘境挂机36层",
	"FHfi8t6W": "南安",
	"Feqd224C": "武都",
	"FkCIDX7U": "渭水",
	"FvRzF3p5": "灵符秘境挂机35层",
	"Fhz05823": "峡谷",
	"FF2kSc4m": "南中",
	"Fzx0jf2G": "泸水",
	"Fcq7C61E": "灵符秘境挂机34层",
	"FX23jSS2": "巫地",
	"F0rj447i": "夷道",
	"Fcq014Zg": "虎亭",
	"F8uyVGEm": "灵符秘境挂机33层",
	"F1zrp45h": "襄阳",
	"FHHUX5tm": "荆州",
	"F57kgfcN": "樊城",
	"F1u6Vni7": "灵符秘境挂机32层",
	"Fr71NsYB": "蜀中",
	"F3a9VZ0g": "阳平关",
	"F6wdG02q": "汉中",
	"FKYH13EB": "灵符秘境挂机31层",
	"Fwg5Z22e": "潼关",
	"Fp8r1887": "华阴",
	"FM7k5Kmt": "渭南",
	"F479ur7t": "灵符秘境挂机30层",
	"F5PGkFX6": "合肥旧城",
	"FQ6I2yW0": "淝水",
	"Fx6d47c5": "合肥新城",
	"Ffr796LB": "灵符秘境挂机29层",
	"FnNiHH0s": "江阳1线",
	"FBHSth11": "江阳2线",
	"FCW2bQ43": "雏城1线",
	"F7b50piG": "雏城2线",
	"FQ9kzmA1": "益州1线",
	"Fpy70xYS": "益州2线",
	"F0tb4IH0": "灵符秘境挂机27层",
	"FH76386f": "灵符秘境挂机28层",
	"Fu75Zwb1": "武陵1线",
	"FmQ0ARDr": "武陵2线",
	"FreZ7fgP": "贵阳1线",
	"FEcMiqrh": "贵阳2线",
	"Ft932PrZ": "长沙1线",
	"F2aFgVmi": "长沙2线",
	"FW6Di85w": "灵符秘境挂机25层",
	"F7qQFHz3": "灵符秘境挂机26层",
	"FYYEQRBG": "夏口1线",
	"Fp9sk0NL": "夏口2线",
	"Ff553i1m": "江陵1线",
	"F371C3zn": "江陵2线",
	"Frr1L2fr": "赤壁1线",
	"FAZGNLwR": "赤壁2线",
	"F0tthk6f": "灵符秘境挂机23层",
	"F1aGK7F9": "灵符秘境挂机24层",
	"FTEjvUWa": "新野1线",
	"Fak502Sg": "新野2线",
	"FkfS2gs0": "樊城1线",
	"FRZ0QW0N": "樊城2线",
	"FyKD9bL0": "博望坡1线",
	"Ft5B0N36": "博望坡2线",
	"F1ZKUBQr": "灵符秘境挂机21层",
	"FEcfM79T": "灵符秘境挂机22层",
	"FNECYL27": "许都1线",
	"FD6C79hm": "许都2线",
	"F39Gg937": "白马1线",
	"FVS46sp8": "白马2线",
	"FM19UzA5": "官渡1线",
	"Fz8E7Gq9": "官渡2线",
	"FAM23SdQ": "灵符秘境挂机19层",
	"FG7e02ks": "灵符秘境挂机20层",
	"FdQ8i857": "查看时间",
	"FvC6zd4h": "按钮1",
	"Fn9276AU": "ui_提前蹲点开关",
	"F14y3bPs": "提前蹲点时间",
	"F01CD833": "ui_从高到低",
	"FtFhyz0P": "随机跑图",
	"FmIWWtD5": "设定跑图距离",
	"FQE5GNVr": "文字框16",
	"F6CC2pF5": "随机跑图延时",
	"FqwGL866": "文字框21",
	"F5Z5qtnD": "加快进图速度",
	"F4emvMtN": "文字框11",
	"F32xWMGa": "多选框2",
	"FESj0xV7": "停顿捡东西时间",
	"F0MA2164": "文字框3",
	"Fpbk4288": "灵符",
	"FR6Ih0vI": "灵符100000级",
	"FZXX6pLY": "灵符110000级",
	"F86nVttx": "灵符120000级",
	"F0xQ601F": "灵符130000级",
	"Fn0p1r3p": "灵符140000级",
	"FGd3SyE3": "灵符150000级",
	"FWS9NH5k": "灵符160000级",
	"F7j4y8b6": "灵符170000级",
	"Fc978Yq7": "灵符180000级",
	"FVdqn8HU": "灵符190000级",
	"FsPg1p38": "灵符200000级",
	"FxrURNny": "灵符210000级",
	"F3SBXFP9": "灵符220000级",
	"FF02uq51": "灵符230000级",
	"FzwriCE2": "灵符240000级",
	"Fq576n53": "灵符250000级",
	"F4fnKzay": "灵符260000级",
	"Fj0G9C05": "灵符270000级",
	"FmW490GN": "灵符280000级",
	"FCs9kFb6": "名将",
	"FxXyFA58": "名将100000级",
	"FVdzB9i1": "名将110000级",
	"FpbFnIts": "名将120000级",
	"FFI9vAN0": "名将130000级",
	"FAGfM23G": "名将140000级",
	"FCr6WK5t": "名将150000级",
	"Fb57Wp2m": "名将160000级",
	"F5zIS6RL": "名将170000级",
	"F6S81U0g": "名将180000级",
	"F9XGnZ5a": "名将190000级",
	"FuyS9398": "名将200000级",
	"Fh9X09AX": "名将210000级",
	"F3A2BuQe": "名将220000级",
	"FbG63p2I": "名将230000级",
	"F3mL7iXF": "名将240000级",
	"FAKCTUDU": "名将250000级",
	"FRY0DH6N": "名将260000级",
	"F6E96q26": "名将270000级",
	"Fp60mgW0": "名将280000级",
	"F7gM7YMQ": "武略",
	"F0Csn478": "武略100000级",
	"FL5ssC31": "武略110000级",
	"FYaT73Y3": "武略120000级",
	"F85Ug29u": "武略130000级",
	"FDHA2n4g": "武略140000级",
	"F7Ph4paS": "武略150000级",
	"F683196Y": "武略160000级",
	"Fjxm73qI": "武略170000级",
	"F0zv71Da": "武略180000级",
	"Fz2cgL5Z": "武略190000级",
	"FG127m82": "武略200000级",
	"Fn374cuG": "武略210000级",
	"FfxC3I6P": "武略220000级",
	"FScdzuc0": "武略230000级",
	"FC0xj4x3": "武略240000级",
	"Fi4r9832": "武略250000级",
	"FeC6fvW6": "武略260000级",
	"F2t52402": "武略270000级",
	"F6r0bn72": "武略280000级",
	"FN3W5wT9": "生肖",
	"FsRZU487": "生肖100000级",
	"Fd5zm7WP": "生肖110000级",
	"F07z9tqm": "生肖120000级",
	"FKpjGUU5": "生肖130000级",
	"Fp69f0zD": "生肖140000级",
	"Fj79YB1t": "生肖150000级",
	"F7h93Cc3": "生肖160000级",
	"FT4AjDRj": "生肖170000级",
	"FDGah97a": "生肖180000级",
	"F8668k3Z": "生肖190000级",
	"F9D4627G": "生肖200000级",
	"Fy0r190i": "生肖210000级",
	"FfNR554e": "生肖220000级",
	"F4z4yq7h": "生肖230000级",
	"F2iF8ssG": "生肖240000级",
	"F14bwe21": "生肖250000级",
	"F5Hn84T6": "生肖260000级",
	"F6s57S1W": "生肖270000级",
	"Fn4CRsUT": "生肖280000级",
	"F4wFB2Q2": "灵符秘境42层",
	"FM6rM0QU": "名将秘境42层",
	"Fdz90VPV": "武略秘境42层",
	"Fg7GtN52": "生肖秘境42层",
	"Fm7hwdzQ": "赞助秘境42层",
	"FCV2qqX2": "攻击秘境42层",
	"F1be6dA1": "斗气秘境42层",
	"FBmh48E5": "剧毒神器42层",
	"Fdj86312": "灵符秘境41层",
	"FU1k8G9V": "名将秘境41层",
	"FQu4tc50": "武略秘境41层",
	"F4c1mypm": "生肖秘境41层",
	"F9Lr73c4": "赞助秘境41层",
	"FuRnZiGG": "攻击秘境41层",
	"F2kfsm9n": "斗气秘境41层",
	"F7I92GC9": "剧毒神器41层",
	"FRy8Z6H8": "灵符秘境40层",
	"Fhbw3Be8": "名将秘境40层",
	"FMawGV0b": "武略秘境40层",
	"Ff8zNm29": "生肖秘境40层",
	"F94hBI6N": "赞助秘境40层",
	"FT6qCL6X": "攻击秘境40层",
	"F6QVqS0D": "斗气秘境40层",
	"FKDiU21N": "剧毒神器40层",
	"FC5f8bi3": "灵符秘境39层",
	"F5ZaR6h1": "名将秘境39层",
	"FzLkk293": "武略秘境39层",
	"Fn2yTw5q": "生肖秘境39层",
	"F68nd22E": "赞助秘境39层",
	"F2khv9x7": "攻击秘境39层",
	"FG4j3z23": "斗气秘境39层",
	"FfB9E7kA": "剧毒神器39层",
	"FVcU8743": "灵符秘境38层",
	"Frtb620I": "名将秘境38层",
	"FZXAi4Ed": "武略秘境38层",
	"FaPu94X1": "生肖秘境38层",
	"FuwAf182": "赞助秘境38层",
	"Fe8LGnTk": "攻击秘境38层",
	"Fwejx2GL": "斗气秘境38层",
	"Fq74rP8Z": "剧毒神器38层",
	"F05aXZ7Y": "灵符秘境37层",
	"Faz3DvHk": "名将秘境37层",
	"Fi3D6wZK": "武略秘境37层",
	"F31UY5Id": "生肖秘境37层",
	"F7rGqm23": "赞助秘境37层",
	"FKmau19A": "攻击秘境37层",
	"Fb9KhFd3": "斗气秘境37层",
	"F4vR3p5m": "剧毒神器37层",
	"FXIM48cX": "灵符秘境36层",
	"F70E2iKA": "名将秘境36层",
	"FGg2d8rB": "武略秘境36层",
	"F32SMG17": "生肖秘境36层",
	"Fkr4mGk3": "赞助秘境36层",
	"Fb50FV8S": "攻击秘境36层",
	"Fw861hHD": "斗气秘境36层",
	"F86xgmm4": "剧毒神器36层",
	"F8Fj92jd": "灵符秘境35层",
	"F11e20Ux": "名将秘境35层",
	"FPPB26Vw": "武略秘境35层",
	"FwLenzn1": "生肖秘境35层",
	"Fk35n0Gh": "赞助秘境35层",
	"F8c9q04Y": "攻击秘境35层",
	"F3ic96TX": "斗气秘境35层",
	"F8hkBs3b": "剧毒神器35层",
	"FCq0e2Am": "灵符秘境34层",
	"FY5s36Ny": "名将秘境34层",
	"F9MRic09": "武略秘境34层",
	"F9V96kF2": "生肖秘境34层",
	"Fpz994r7": "赞助秘境34层",
	"Fb19G8s2": "攻击秘境34层",
	"FVQY9iww": "斗气秘境34层",
	"FcfC2uRS": "剧毒神器34层",
	"F62dy1qi": "灵符秘境33层",
	"F62rpj23": "名将秘境33层",
	"FA9VjW8f": "武略秘境33层",
	"Fy41Q4kt": "生肖秘境33层",
	"F384dK2A": "赞助秘境33层",
	"F45U7imj": "攻击秘境33层",
	"Fs1AF4pX": "斗气秘境33层",
	"F66X5P22": "剧毒神器33层",
	"Fe9BijQ0": "灵符秘境32层",
	"F6Y69P4T": "名将秘境32层",
	"FV83f4UL": "武略秘境32层",
	"F2fPY3PA": "生肖秘境32层",
	"F1nF6Y2n": "赞助秘境32层",
	"FjG3PaFw": "攻击秘境32层",
	"Fb69rM6K": "斗气秘境32层",
	"FsE18Mw9": "剧毒神器32层",
	"FT834Ue0": "灵符秘境31层",
	"Fy8C3mc9": "名将秘境31层",
	"FrCpKcH2": "武略秘境31层",
	"F38pSHM2": "生肖秘境31层",
	"F7KrChKZ": "赞助秘境31层",
	"FxM0968U": "攻击秘境31层",
	"FP77nG5M": "斗气秘境31层",
	"F1LTy451": "剧毒神器31层",
	"F0g0e9Ix": "灵符秘境30层",
	"FV8n6pPG": "名将秘境30层",
	"FxKQn9D6": "武略秘境30层",
	"FVWxD113": "生肖秘境30层",
	"FWNpb826": "赞助秘境30层",
	"FGwN0R09": "攻击秘境30层",
	"FxjXQps3": "斗气秘境30层",
	"F04B8Kf3": "剧毒神器30层",
	"Fj7x819A": "灵符秘境29层",
	"F9fyNxqp": "名将秘境29层",
	"F5IUNis3": "武略秘境29层",
	"F7Db387d": "生肖秘境29层",
	"FLMTi8kQ": "赞助秘境29层",
	"FqEEDFnF": "攻击秘境29层",
	"F0pws4Sy": "斗气秘境29层",
	"FE09Gm5B": "剧毒神器29层",
	"FB711gTZ": "灵符秘境27层",
	"F6q9N0pn": "灵符秘境28层",
	"F71H864N": "名将秘境27层",
	"Fv3Fk1X9": "名将秘境28层",
	"F0635htH": "武略秘境27层",
	"F9sSaAc0": "武略秘境28层",
	"F2ggv64F": "生肖秘境27层",
	"F7KYm941": "生肖秘境28层",
	"FLi5ERKW": "赞助秘境27层",
	"Fd2kG9q8": "赞助秘境28层",
	"F3558Vfy": "攻击秘境27层",
	"Fx41ckbh": "攻击秘境28层",
	"FNWrtZs3": "斗气秘境27层",
	"Fr9nMs37": "斗气秘境28层",
	"FcqsFs9t": "灵符秘境25层",
	"Fi3Kz80Z": "灵符秘境26层",
	"F65259H5": "名将秘境25层",
	"F68ZtY85": "名将秘境26层",
	"F612LmZ1": "武略秘境25层",
	"FYb5GZt4": "武略秘境26层",
	"FBnd4xsp": "生肖秘境25层",
	"F9Z39B3s": "生肖秘境26层",
	"Fnri5Bgv": "赞助秘境25层",
	"FUAhPDA1": "赞助秘境26层",
	"F2B45M6h": "攻击秘境25层",
	"F9f73h0t": "攻击秘境26层",
	"FB8h4g7T": "斗气秘境25层",
	"Fd2r17CZ": "斗气秘境26层",
	"F05x3p37": "灵符秘境23层",
	"Fan89erI": "灵符秘境24层",
	"F4Z66X9Q": "名将秘境23层",
	"FB5901U2": "名将秘境24层",
	"F84aGWux": "武略秘境23层",
	"FkBh4zW6": "武略秘境24层",
	"Fz0A1Y6U": "生肖秘境23层",
	"F5wk1deC": "生肖秘境24层",
	"F0ITrXZd": "赞助秘境23层",
	"FILP30H9": "赞助秘境24层",
	"FS37VCMe": "攻击秘境23层",
	"FP6Pf43T": "攻击秘境24层",
	"FQ8R12t7": "斗气秘境23层",
	"Fg21x89z": "斗气秘境24层",
	"F4jS48Ws": "灵符秘境21层",
	"Fr7u03UD": "灵符秘境22层",
	"FG65i5dI": "名将秘境21层",
	"F5T0Y57M": "名将秘境22层",
	"Fj94gg34": "武略秘境21层",
	"Fzn81y2U": "武略秘境22层",
	"FdPi3b4b": "生肖秘境21层",
	"FYeK3E5s": "生肖秘境22层",
	"F53Pm3fU": "攻击秘境21层",
	"Fj3apj5P": "攻击秘境22层",
	"F0x598p3": "赞助秘境21层",
	"F7N88CP4": "赞助秘境22层",
	"FHTva1nP": "斗气秘境21层",
	"FX3Iz6Wa": "斗气秘境22层",
	"FpfGc01m": "灵符秘境20层",
	"F1ZLYMLM": "名将秘境20层",
	"Fi6Vu1c8": "武略秘境19层",
	"Fhx5R1iL": "武略秘境20层",
	"FL0vMB3v": "生肖秘境19层",
	"FjYb9ep6": "生肖秘境20层",
	"F2A31tIL": "攻击秘境19层",
	"FI901Wwe": "攻击秘境20层",
	"Fx4WvM5z": "赞助秘境19层",
	"F15j7D4R": "赞助秘境20层",
	"FMka3K1Z": "斗气秘境19层",
	"FGYa2xim": "斗气秘境20层",
	"F6Q3d2K2": "生肖秘境17层",
	"F0BQ202f": "生肖秘境18层",
	"FR5YX9X9": "异界",
	"F8i8q262": "孟获",
	"F2d737t1": "诸葛",
	"F8jSwaQm": "姜维",
	"FEA8F1Uj": "邓艾",
	"FTc4k4bh": "司马昭",
	"Fh4DI0PY": "关索",
	"FpXZ6461": "帝陵大陆1层",
	"FsA6044K": "帝陵大陆2层",
	"FRBP479e": "苍梧之巅1层",
	"FGL1MG2r": "混沌瀛洲1层",
	"FMTPtw27": "混沌俊疾1层",
	"FSHhxxX2": "神火仙令1层",
	"FUe3N70N": "神冰仙令1层",
	"FG95Czi7": "神木仙令1层",
	"F53Qse8R": "神雷仙令1层",
	"F6idPYVG": "神火仙令2层",
	"FhmnXUk6": "神冰仙令2层",
	"FWSi08H8": "神木仙令2层",
	"FZ7Z5yF8": "神雷仙令2层",
	"FM2G969p": "神火仙令3层",
	"Fh3AFQN6": "神冰仙令3层",
	"FrhgWfYK": "神木仙令3层",
	"FwzL9v1g": "神雷仙令3层",
	"FmNKXF10": "神火仙令4层",
	"F4mZArTa": "神冰仙令4层",
	"Fj2g3WF2": "神木仙令4层",
	"F3p31b5A": "神雷仙令4层",
	"FwGVD8my": "神火仙令5层",
	"F642kv50": "神冰仙令5层",
	"Fr79At0d": "神木仙令5层",
	"FZz3VCK5": "神雷仙令5层",
	"FUGBG6X6": "登仙路5层",
	"F9PT4NsP": "5神冰5",
	"Fq92HR4Q": "5神火5",
	"F05hWL6f": "5神木5",
	"F9P1inrI": "5神雷5",
	"FFeD72c3": "5神冰6",
	"Fi70M342": "5神火6",
	"Fk8CMBCK": "5神木6",
	"F1093I0w": "5神雷6",
	"Fw3ABs4f": "5神冰7",
	"Fuc3Cn1A": "5神火7",
	"F3vq4kg3": "5神木7",
	"Fh338h95": "5神雷7",
	"FKE6595U": "登仙路4层",
	"FECNyId2": "4神冰4",
	"FP7453As": "4神火4",
	"FKQjVXc4": "4神木4",
	"FmiBnmDj": "4神雷4",
	"F36zbU5v": "4神冰5",
	"F29PCD8Z": "4神火5",
	"FufFLPP5": "4神木5",
	"F41LrvaF": "4神雷5",
	"F48qx6A5": "4神冰6",
	"FGW81pDF": "4神火6",
	"F5M946VH": "4神木6",
	"F8j1qaYn": "4神雷6",
	"F5w7HnKX": "登仙路3层",
	"F47Z73M4": "3神冰3",
	"Fn6E16ZG": "3神火3",
	"F4410bVu": "3神木3",
	"FzVSd1h1": "3神雷3",
	"FgN43KGC": "3神冰4",
	"FHR6D9Z0": "3神火4",
	"F42185T3": "3神木4",
	"FvGL9aA6": "3神雷4",
	"FHjUI7NG": "3神冰5",
	"FD69pk7X": "3神火5",
	"F2C8zn4R": "3神木5",
	"F484UVDe": "3神雷5",
	"FTF2p2RT": "登仙路2层",
	"F6ui464R": "2神冰2",
	"FRBtZ099": "2神火2",
	"F7x3pj9w": "2神木2",
	"F7ZE149K": "2神雷2",
	"FKpV85y7": "2神冰3",
	"FU276880": "2神火3",
	"F7FeM99B": "2神木3",
	"FTdrRt5E": "2神雷3",
	"FsUPi6nh": "2神冰4",
	"FkTiHFYS": "2神火4",
	"Fc147H1r": "2神木4",
	"Fq07cC3U": "2神雷4",
	"F4ZZ61M9": "登仙路1层",
	"F3iV0KU0": "1神冰1",
	"Fb24GVZ6": "1神火1",
	"Fvk104Bj": "1神木1",
	"FHrD27C4": "1神雷1",
	"F3T53x6s": "1神冰2",
	"FfKuv497": "1神火2",
	"FnkE76ba": "1神木2",
	"F7G4Az2M": "1神雷2",
	"FA08zwrT": "1神冰3",
	"FyVCkds0": "1神火3",
	"F5dKG8A6": "1神木3",
	"Fv6TAg3w": "1神雷3",
	"FUGh6xka": "决战官渡1层",
	"FVMSb2F4": "跨服",
	"F42S8QZS": "张合",
	"F5Cq7gQt": "乐进",
	"F6HznQTu": "徐晃",
	"F35295C0": "张辽",
	"FZ1IRn76": "于禁",
	"Fwq4bfGu": "赵云",
	"FgkZa9Sd": "赵云2",
	"F98K4Wk3": "赵云3",
	"F7uE307B": "法正",
	"FSGt4Q62": "法正2",
	"FSkcyRtR": "法正3",
	"F7D2j9G7": "张辽2",
	"FGLUTgD2": "张辽3",
	"FGugVa27": "马超",
	"FWT54tY5": "马超2",
	"FrqZjP4b": "黄忠",
	"F6Y033gR": "关羽",
	"FV771MYZ": "草船借箭",
	"F138F9XF": "福利boss",
	"F772xSs4": "福利类型选择",
	"FD87375x": "文字框7",
	"FCm6W3pb": "护送军需",
	"FG920g04": "灵符领取",
	"F9d49K1x": "三英战吕布",
	"FEn168ZF": "煮酒论英雄",
	"Fy2qB6E1": "倍数选择",
	"Fr2GVj7v": "千里走单骑"
}';
        //$udataben=(array)json_decode($udataben);
        $udataben=(array)json_decode($udataben);
        foreach ($udata as $k=>$v){
           
                if ( isset($udataben[$k]) and $udataben[$k]){
                    $udata1[$udataben[$k]]=$v;
                }else{
                    $udata1[$k]=$v;
                }
            
            
        }
       // return json_encode($udata1, JSON_UNESCAPED_UNICODE);;
        $udata2=$this->ulku($udata1);
        $udata2=json_encode($udata2, JSON_UNESCAPED_UNICODE);
        
       $current_time = date('Y-m-d H:i:s');
        return json(['id' => $id,'code' => 43,'date'=>$current_time, 'msg' => 'ok','data'=>12,'km'=>$km,'udata'=>$udata2]);
    }
    public function ulku($ul){
        
         $普通挂机arr=["横江1线","东治1线","泾县1线","横江2线","东治2线","泾县2线","许都1线","许都2线","白马1线","白马2线","官渡1线","官渡2线"
    ,"新野1线","新野2线","樊城1线" ,"樊城2线","博望坡1线","博望坡2线"
    ,"夏口1线","夏口2线","江陵1线" ,"江陵2线","赤壁1线","赤壁2线"
    ,"武陵1线","武陵2线","贵阳1线" ,"贵阳2线","长沙1线","长沙2线"
    ,"江阳1线","江阳2线","雏城1线" ,"雏城2线","益州1线","益州2线"
    ,"合肥旧城","淝水","合肥新城"
    ,"潼关","华阴","渭南"
    ,"蜀中","阳平关","汉中"
    ,"襄阳","荆州","樊城"
    ,"巫地","夷道","猇亭"
    ,"峡谷","南中","泸水"
    ,"南安","武都","渭水"
    ,"雍州","淮南","洮阳"
    ,"剑门山","阴平","绵竹"
    ,"涂中","石头城","长安"
    ,"芦塘寨","成都","荆州2"
    ,"许昌","荆州3","乱石岗"
    ,"雾山","会稽","吴郡"
    ,"水镜庄","襄阳2","檀溪"
    ,"巨鹿郡","曲阳泉","峨眉山"
    ,"苏州","河北","荆州4"
    ,"苏州2","许都","亳州"
    ,"利漕","斥丘","冀州"
    ,"建平","桑干河","朔方"
    ,"山西","下邳"
    ,"吴","益州","甘露寺"
    ,"霍山","同安","皖城"
    ,"建业","江夏","吴郡1"
    ,"关东","平阳","长安1"
    ,"中山郡","甄城","范县"
    ,"荆州5","沔南","白水"
    ];
	//return $普通挂机arr[0];
	$ul["已勾选地图"]=array();
	
	
		If($ul["倒序进图"]){
			For ($i =0 ;$i<=count($普通挂机arr)-1;$i++){
				If (isset($ul[$普通挂机arr[$i]]) and $ul[$普通挂机arr[$i]] == true){
					$ul["已勾选地图"][]=$普通挂机arr[$i];
				}
			}
			
		}else{
			For ($i = count($普通挂机arr)-1;$i>=0;$i--){
				If ( isset($ul[$普通挂机arr[$i]]) and $ul[$普通挂机arr[$i]] == true){
					$ul["已勾选地图"][]=$普通挂机arr[$i];
				}
			}
		}
		
		for($i=60;$i>=1;$i--){
			       
			       if(isset($ul["灵符秘境挂机".$i."层"])){
			           if($ul["灵符秘境挂机".$i."层"] == true ){
			            $ul["已勾选地图"][]="灵符秘境挂机".$i."层";
			        }
			       }
			    }
	$地图=array();	
	$全部普通地图=array("福利特权","灵符秘境","武略秘境","名将秘境","生肖秘境","攻击秘境","赞助秘境","斗气秘境","剧毒神器","大陆地图","名将试炼");
	if($ul["自定义优先级普通"]==true){
		
		for($i = 1; $i <= 11; $i++){
			if($ul["boss优先顺序".$i]+ 1 == 1 ){
				$地图[]="灵符秘境";
			}
			if($ul["boss优先顺序".$i]+ 1 == 2 ){
				$地图[]="武略秘境";
			}
			if($ul["boss优先顺序".$i]+ 1 == 3 ){
				$地图[]="名将秘境";
			}
			if($ul["boss优先顺序".$i]+ 1 == 4 ){
				$地图[]="生肖秘境";
			}
			if($ul["boss优先顺序".$i]+ 1 == 5 ){
				$地图[]="攻击秘境";
			}
			if($ul["boss优先顺序".$i]+ 1 == 6 ){
				$地图[]="赞助秘境";
			}
			if($ul["boss优先顺序".$i]+ 1 == 7 ){
				$地图[]="斗气秘境";
			}
			if($ul["boss优先顺序".$i]+ 1 == 8 ){
				$地图[]="剧毒神器";
			}
			if($ul["boss优先顺序".$i]+ 1 == 9 ){
				$地图[]="名将试炼";
			}
			if($ul["boss优先顺序".$i]+ 1 == 10 ){
				$地图[]="大陆地图";
			}
			if($ul["boss优先顺序".$i]+ 1 == 11 ){
				$地图[]="福利特权";
			}
		}
        //return $地图;
        for ($u = 0; $u <= count($全部普通地图)-1; $u++){
			
			$地图[]=$全部普通地图[$u];
		}
		
		$newArray = array();
		$地图=array_unique($地图);
        
        foreach ($地图 as $value) {
            if (!in_array($value, $newArray)) {
                $newArray[] = $value;
            }
        }
        $地图=array();
        $地图=$newArray;
		
	}else{
		$地图=array("福利特权","灵符秘境","武略秘境","名将秘境","生肖秘境","攻击秘境","赞助秘境","斗气秘境","剧毒神器","大陆地图","名将试炼");
    
	}
	$ul["巡航boss层数"]=array();
	if($ul["ui_从高到低"]){
	    for($u=0;$u<=count($地图)-1;$u++){
	        for($i=111;$i>=1;$i--){
	            if(isset($ul[$地图[$u].$i."层"]) and $ul[$地图[$u].$i."层"]){
	                $ul["巡航boss层数"][]=$地图[$u].$i."层";
	            }
	        }
	    }
	}else {
	   for($u=0;$u<=count($地图)-1;$u++){
	        for($i=1;$i<=111;$i++){
	            
	            
	            if(isset($ul[$地图[$u].$i."层"]) and $ul[$地图[$u].$i."层"]){
	                $ul["巡航boss层数"][]=$地图[$u].$i."层";
	            }
	            
	        }       
	        
	    }
	}

    $全部地图=array("灵兽挑战","跨服战场","异界天命","混沌秘境","决战官渡","登仙路","神火仙令","神冰仙令","神木仙令","神雷仙令","苍梧之巅","混沌昆仑","混沌瀛洲","混沌俊疾","帝陵大陆","神火法宝","神冰法宝","神木法宝","神雷法宝","骰王秘境","试炼之地");
    
	$ul["优先巡航boss层数"]=array();
	$优先地图=array();
    if($ul["自定义优先级优先"]){
        if($ul["最优先设定"]){
            if($ul["最优先顺序"]+ 1 == 1 ){
				$优先地图[0]="混沌秘境";
			}
			if($ul["最优先顺序"]+ 1 == 2 ){
				$优先地图[0]="决战官渡";
			}
			if($ul["最优先顺序"]+ 1 == 3 ){
				$优先地图[0]="帝陵大陆";
			}
			if($ul["最优先顺序"]+ 1 == 4 ){
				$优先地图[0]="骰王秘境";
			}
			if($ul["最优先顺序"]+ 1 == 5 ){
				$优先地图[0]="试炼之地";
			}
			if($ul["最优先顺序"]+ 1 == 6 ){
				$优先地图[0]="跨服战场";
			}
			if($ul["最优先顺序"]+ 1 == 7 ){
				$优先地图[0]="异界天命";
			}
			$优先地图[1]="福利挑战";
			$优先地图[2]="战阵秘境";
        }else{
            $优先地图[0]="福利挑战";
			$优先地图[1]="战阵秘境";
        }
        
        for($i=1;$i<=11;$i++){
            if($ul["优先boss优先顺序".$i]+1 == 1){
                $优先地图[]="混沌秘境";
            }
            if($ul["优先boss优先顺序".$i]+1 == 2){
                $优先地图[]="决战官渡";
            }
            if($ul["优先boss优先顺序".$i]+1 == 3){
                $优先地图[]="登仙路";
            }
            if($ul["优先boss优先顺序".$i]+1 == 4){
                $优先地图[]="神火仙令";
                $优先地图[]="神冰仙令";
                $优先地图[]="神木仙令";
                $优先地图[]="神雷仙令";
            }
            if($ul["优先boss优先顺序".$i]+1 == 5){
                $优先地图[]="苍梧之巅";
                $优先地图[]="混沌昆仑";
                $优先地图[]="混沌瀛洲";
                $优先地图[]="混沌俊疾";
                $优先地图[]="混沌王城";
            }
            if($ul["优先boss优先顺序".$i]+1 == 6){
                $优先地图[]="帝陵大陆";
                
            }
            if($ul["优先boss优先顺序".$i]+1 == 7){
                $优先地图[]="神火法宝";
                $优先地图[]="神冰法宝";
                $优先地图[]="神木法宝";
                $优先地图[]="神雷法宝";
            }
            if($ul["优先boss优先顺序".$i]+1 == 8){
                $优先地图[]="骰王秘境";
            }
            if($ul["优先boss优先顺序".$i]+1 == 9){
                $优先地图[]="试炼之地";
            }
            if($ul["优先boss优先顺序".$i]+1 == 10){
                $优先地图[]="跨服战场";
            }
            if($ul["优先boss优先顺序".$i]+1 == 11){
                $优先地图[]="异界天命";
            }
        }
        for ($u = 0; $u <= count($全部地图)-1; $u++){
			
			$优先地图[]=$全部地图[$u];
		}
		
		$newArray = array();
		$优先地图=array_unique($优先地图);
        
        foreach ($优先地图 as $value) {
            if (!in_array($value, $newArray)) {
                $newArray[] = $value;
            }
        }
        $优先地图=array();
        $优先地图=$newArray;
        //return $newArray;
        
    }else{
         $优先地图=array("福利挑战","战阵秘境","灵兽挑战","跨服战场","异界天命","混沌秘境","决战官渡","登仙路","神火仙令","神冰仙令","神木仙令","神雷仙令","苍梧之巅","混沌昆仑","混沌瀛洲","混沌俊疾","混沌王城","帝陵大陆","神火法宝","神冰法宝","神木法宝","神雷法宝","骰王秘境","试炼之地");
    
    }
    
    
    if($ul["ui_从高到低"]){
	    for($u=0;$u<=count($优先地图)-1;$u++){
	        for($i=19;$i>=1;$i--){
	            if(isset($ul[$优先地图[$u].$i."层"]) and $ul[$优先地图[$u].$i."层"]){
	                $ul["优先巡航boss层数"][]=$优先地图[$u].$i."层";
	            }
	        }
	    }
	}else {
	   for($u=0;$u<=count($优先地图)-1;$u++){
	        for($i=1;$i<=19;$i++){
	            if(isset($ul[$优先地图[$u].$i."层"]) and $ul[$优先地图[$u].$i."层"]){
	                $ul["优先巡航boss层数"][]=$优先地图[$u].$i."层";
	            }
	        }
	    }
	}
    
    
    
    $ul["ui_使用随机间隔"]=intval($ul["ui_使用随机间隔"]);
    $ul["发现没怪间隔"]=intval( $ul["发现没怪间隔"]);
    $ul["ui_挂机时间"] = intval($ul["ui_挂机时间"]);
    
    
    $ul["提前蹲点时间"] = intval($ul["提前蹲点时间"]);
    
   
    
    if($ul["随机跑图延时"] == null or $ul["随机跑图延时"] == 0 ){
	    
		$ul["随机跑图延时"] = 500;
		
	}
	
	if($ul["ui_提前蹲点开关"] == False){
	    
		$ul["提前蹲点时间"] = 0;
		
	}
    
	return $ul;
    }
    
}